import shutil

def write_fun():
    with open('demo.txt', 'w', encoding='utf-8') as f:
        f.write('hello world')


def read_fun():
    with open('demo.txt', 'r', encoding='utf-8') as f:
        print(f.read())


def copy(src, dst):
    shutil.copy(src, dst)


def copy_fun():
    with open('demo.txt', 'r', encoding='utf-8') as f:
        with open('demo2.txt', 'w', encoding='utf-8') as f2:
            f2.write(f.read())


if __name__ == '__main__':
    write_fun()
    read_fun()
    copy_fun()
    copy(dst='demo3.txt', src='demo.txt')
